#!/bin/bash

########################################
#                                      #
# system_monitor_beta.sh               #
# author: A.Ruiz                       #
#                                      #
########################################


#VARIABLES
today=`date +%d%m%Y`
filename="SYSTEM-"$today".log"
logPath="/var/log/"

#COMPROBAMOS/CREAMOS FICHERO
if [ -f $logPath$filename ]; then 
	#echo "El fichero ya existe";
else 
	touch $logPath$filename;
fi

#INSERTAMOS INFO
echo ---------------- >> $logPath$filename
echo  " --- "`date +%H:%M`" --- " >> $logPath$filename
echo ---------------- >> $logPath$filename
sensors >> $logPath$filename
echo ---------------- >> $logPath$filename

